import { User, selectUserField } from '@/entity/User';

import { Service, Inject } from 'typedi'
import { Entity } from '@/utils/orm'
import { JsonResult, msgList, res } from '@/utils/jsonResult';

import { Tag } from '@/entity/Tag';

@Service()
export class TagDao {

    @Inject()
    orm!: Entity

    @Inject()
    json!: JsonResult<any>;

    //标签查询全部
    async Taglist(): Promise<res<Tag[]>> {
        let res = await this.orm.repository(Tag).getMany();
        return this.json.success(res);
    }
}